package com.will.account.controller;

import com.will.account.response.AjaxResult;
import com.will.account.service.IAccountService;
import com.will.common.dto.AccountDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private IAccountService accountService;

    @PutMapping("/decreaseAccount")
    public AjaxResult decreaseAccount(@RequestBody AccountDto accountDto) {
        return accountService.decreaseAccount(accountDto);
    }
}
